package com.zhku.meeting.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhku.meeting.entities.Room;
import com.zhku.meeting.entities.ShowStatus;
import com.zhku.meeting.entities.TempStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ShowStatusMapper extends BaseMapper<ShowStatus> {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table status
     *
     * @mbg.generated Mon Jun 15 21:19:27 CST 2020
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table status
     *
     * @mbg.generated Mon Jun 15 21:19:27 CST 2020
     */
    int insert(Room room);


    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table status
     *
     * @mbg.generated Mon Jun 15 21:19:27 CST 2020
     */
    ShowStatus selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table status
     *
     * @mbg.generated Mon Jun 15 21:19:27 CST 2020
     */
    List<ShowStatus> selectAll();

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table status
     *
     * @mbg.generated Mon Jun 15 21:19:27 CST 2020
     */
    int updateByPrimaryKey(ShowStatus record);

    void updateStatus(@Param("status") TempStatus occupyRooms);

    void updateDefault(@Param("room") Room room);

    void updateRepair(@Param("room") Room room);

    void updateEquipment(@Param("roomId") Integer id, @Param("air") Boolean air,@Param("projector")Boolean projector);
}